#ifndef __PRODUCT_H__
#define __PRODUCT_H__

#include <iostream>

class AProductX
{
public:
    AProductX() = default;
    virtual ~AProductX() = default;
};

class AProductY
{
public:
    AProductY() = default;
    virtual ~AProductY() = default;
};

class ProductX1 : public AProductX
{
public:
    ProductX1()
    {
        std::cout << "new product x1" << std::endl;
    }
    ~ProductX1()
    {
        std::cout << "del product x1" << std::endl;
    }
};

class ProductX2 : public AProductX
{
public:
    ProductX2()
    {
        std::cout << "new product x2" << std::endl;
    }
    ~ProductX2()
    {
        std::cout << "del product x2" << std::endl;
    }
};

class ProductY1 : public AProductY
{
public:
    ProductY1()
    {
        std::cout << "new product y1" << std::endl;
    }
    ~ProductY1()
    {
        std::cout << "del product y1" << std::endl;
    }
};

class ProductY2 : public AProductY
{
public:
    ProductY2()
    {
        std::cout << "new product y2" << std::endl;
    }
    ~ProductY2()
    {
        std::cout << "del product y2" << std::endl;
    }
};


#endif

